<!DOCTYPE html>
<html>

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta name="fragment" content="!">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
          content="minimal-ui,width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="white">
    <meta name="format-detection" content="telephone=no">
        <!--    <link rel="stylesheet" th:href="@{/css/bootstrap.css}">-->
    <link href="../source/loader/download.css" type="text/css" rel="stylesheet"/>
    <!--    <script type="text/javascript" th:src="@{/js/qrcode.js}"></script>-->
    <!--    <script type="text/javascript" th:src="@{/js/jquery-1.11.0.min.js}"></script>-->
    <title>大众创技</title>
    <script type="text/javascript" charset="utf-8">startTime = new Date();</script>
</head>

<body class="no-scroll">
<span class="pattern left">
        <img  src="../source/loader/download_pattern_left.png"/>
      </span>
<span class="pattern right">
        <img  src="../source/loader/download_pattern_right.png"/>
    </span>
<div class="notice-wechat">
    <div class="wechat-tips" onclick="app.closeCover()">
      <span class="tip">
        点击右上角菜单<br/>在默认浏览器中打开并安装应用
      </span>
        <span class="ios">
      </span>
        <img  src="../source/loader/short-arrow.png">
    </div>
</div>
<div class="out-container">
    <div class="main">
        <header itemscope="" itemtype="http://schema.org/SoftwareApplication">
            <div class="table-container">
                <div class="cell-container">
                    <div class="app-brief">
                        <div class="icon-container wrapper">
                            <i class="icon-icon_path bg-path"></i>
                            <span class="icon">
                                    <img src="./icon.png" itemprop="image" />
                            </span>
                                <span class="qrcode" id="qrcode" data="./index.html">
                            </span>


                        </div>
                        <div class="release-info">
                            <p>大众创技</p>
                            <p>大众创技很棒的APP</p>
                        </div>
                        <p class="scan-tips">扫描二维码下载<br>或用手机浏览器输入网址:&nbsp;&nbsp;<span
                                class="text-black">https://v3.gitee.io/co/vW2k</span></p>

                        <div id="actions" class="actions type-{{app.type}}">
                            <input id="installURL" value="itms-services://?action=download-manifest&url=https%3A%2F%2Fv3.gitee.io%2Fco0%2FvW2k%2Fmanifest.plist" style="display: none"/>
                            <button onclick="app.install()">下载安装</button>
                        </div>
                        <div id="actions" class="actions type-{{app.type}}">
                            <button onclick="app.openSettings()">立即信任</button>
                        </div>
                        <div class="platform-matching-tips">
                        </div>
                    </div>
                </div>
            </div>

        </header>
        <!-- Release list -->
    </div>
</div>
<script src="../source/loader/zepto.js"  ></script>
<script src="../source/loader/qrcode.js"  ></script>
<script type="application/javascript" th:inline="javascript">

    var codeData = $("#qrcode").attr("data");
    new QRCode("qrcode", {
        text: codeData,
        width: 200,
        height: 200,
        colorDark: '#000000',
        colorLight: '#ffffff',
        correctLevel: QRCode.CorrectLevel.L
    });

    (function () {
        $(function () {
            this.app = {
                platform: {},
                init: function () {
                    return this.detectPlatform();
                },
                detectPlatform: function () {
                    var a;
                    return a = navigator.appVersion, this.platform.isWechat = /micromessenger/i.test(a), this.platform.isQQ = /qq/i.test(a), this.platform.is_mobile = !1, /(android|BB10)/gi.test(a) ? (this.platform.is_ios = !1, this.platform.is_android = !0, this.platform.is_mobile = !0, this.platform.value = "android", this.platform.is_phone = !0) : /iP(hone|od|ad)/g.test(a) ? (this.platform.is_mobile = !0, this.platform.is_ios = !0, this.platform.ios_6_x = /OS 6_(\d(_\d)*)/g.test(a), this.platform.is_android = !1, /iP(hone|od)/g.test(a) && (this.platform.is_phone = !0), this.platform.value = "ios") : void 0
                },
                setAppleLoc: function () {
                    console.log("Loc");
                    var weblink = 'itms-services://?action=download-manifest&url=https%3A%3F%3Fgitee.com%3Fv3%3Fco%3Fraw%3Fmaster%3FvW2k%3Fmanifest.plist';
                    setTimeout(function () {
                        document.location = weblink;
                    }, 500);

                },
                setLocation: function () {
                    console.log("setLocation");
                    var weblink = 'itms-services://?action=download-manifest&url=https%3A%3F%3Fgitee.com%3Fv3%3Fco%3Fraw%3Fmaster%3FvW2k%3Fmanifest.plist';

                    setTimeout(function () {
                        document.location = weblink;
                    }, 500);


                },
                openSettings: function () {
                    if (this.platform.isWechat) {
                        if (this.platform.is_ios) {
                            $('.wechat-tips').find('.tip').html('点击右上角菜单在<br/>Safari 中打开并安装');
                        }
                        $('body').addClass("show-wechat-notice");
                    } else {
                         setTimeout(function () {
                            document.location = './embedded.mobileprovision';
                        }, 500);

                    }
                },
                install: function () {
                    if (this.platform.isWechat) {
                        if (this.platform.is_ios) {
                            $('.wechat-tips').find('.tip').html('点击右上角菜单在<br/>Safari 中打开并安装');
                        }
                        $('body').addClass("show-wechat-notice");
                    } else {
                        if (this.platform.is_ios) {
                            this.setAppleLoc();
                        } else {
                            this.setLocation();
                        }

                    }
                },
                closeCover: function () {
                    $('body').removeClass("show-wechat-notice");
                }
            }, app.init()
        });
    }).call(this);

</script>
</body>

</html>